//  -------------------- iSharePoint -------------------- //
// 
//  Company:	IT Complex, LLC
//  Project:	Smart.Common
//  File name:	IQueryBuilderOrderBy.cs
//  Developer:	Solomatov Igor
//  Created:	15.04.2012
// 
//  -------------------- iSharePoint -------------------- //

namespace Smart.Common.Entities
{
	/// <summary>
	/// OrderBy group
	/// </summary>
	public interface IQueryBuilderOrderBy<TExecutorType> : IQueryBuilderItem<TExecutorType>
		where TExecutorType : class
	{
		/// <summary>
		/// Add sort by <paramref name="field"/> ascending
		/// </summary>
		IQueryBuilderOrderBy<TExecutorType> Asc(string field);

		/// <summary>
		/// Add sort by <paramref name="field"/> descending
		/// </summary>
		IQueryBuilderOrderBy<TExecutorType> Desc(string field);

		/// <summary>
		/// Add sort by <paramref name="field"/> with <paramref name="asc"/>
		/// </summary>
		IQueryBuilderOrderBy<TExecutorType> Sort(string field, bool asc);
	}
}